<?php $this->placeholder('menu_submit_entry')->captureStart() ?>
<script type="text/javascript">
	$(document).ready(function(){
		$('#link_submit_entry').click(function(e){
			e.preventDefault();
			<?php if (empty($this->id_user)):?>
				authorizeBeforeGotoSubmit(
					"<?php echo $this->social->pageUrl(array('target' => 'submit'));?>",
					"<?php echo $this->social->getOAuthScope();?>"
				);
			<?php else:?>
				top.location.href = "<?php echo $this->social->pageUrl(array('target' => 'submit'));?>";
			<?php endif;?>
		});
	});
</script>
<li id="submit_an_entry" class="right">
	<?php if($this->is_allow_submit):?>
		<a target="_top" href="<?php echo $this->social->pageUrl(array());?>#" id="link_submit_entry">
			<?php echo $this->translate('MENU_SUBMIT_AN_ENTRY'); ?>
		</a>
	<?php else:?>
		<?php echo $this->translate('MENU_SUBMIT_AN_ENTRY'); ?>
	<?php endif;?>
</li>
<?php $this->placeholder('menu_submit_entry')->captureEnd() ?>